package com.xq.string;

/**
 * @author jltxseo
 *         Created by junlintianxia on 2017/07/09.
 *             此题中解析跟StringNewTest5原理类似
 */

public class StringNewTest6 {
    private static String a = new String("ab");
    public static void main(String[] args) {
        String s1 = "a";
        String s2 = "b";
        String s = s1 + s2;
        System.out.println(s == a);
        System.out.println(s.intern() == a);
        System.out.println(s.intern() == a.intern());
    }

}
